import { Column, DeleteDateColumn, Entity, PrimaryGeneratedColumn } from "typeorm"

@Entity({ name: "user" })
export class UserEntity {
  // index
  @PrimaryGeneratedColumn({ type: "int" })
  id: number

  // account/email
  @Column({ type: "varchar" })
  email: string

  // password
  @Column({ type: "varchar" })
  password: string

  // register date
  @Column({ type: "date" })
  create_date: string

  // user status
  @Column({ type: "int" })
  status: number

  // soft deletion tag
  @DeleteDateColumn({ nullable: true })
  deleteAt: Date
}
